Attributes

The Player Meta for the Attributes Module.

Functions

playerMeta:consumeStamina(amount)

Consumes stamina from the player. This function decreases the player's stamina by a specified amount, clamping the value between 0 and the character's maximum stamina. If stamina is depleted, it may trigger a breathless state.

Parameters

  • amount Integer

    The amount of stamina to consume.

playerMeta:hasSkillLevel(skill, level)

Checks if the player has a skill level equal to or greater than the specified level.

Parameters

  • skill String

    The skill to check.

  • level Integer

    The required skill level.

Returns

  • bool

    Whether the player's skill level meets or exceeds the specified level.

playerMeta:meetsRequiredSkills(requiredSkillLevels)

Checks if the player meets the required skill levels.

Parameters

  • requiredSkillLevels Table

    A table containing the required skill levels.

Returns

  • bool

    Whether the player meets all the required skill levels.

playerMeta:restoreStamina(amount)

Restores stamina for the player. This function restores a certain amount of stamina to the player, clamping the value between 0 and the character's maximum stamina. If stamina is restored above a certain threshold, it will trigger the removal of a breathless state.

Parameters

  • amount Integer

    The amount of stamina to restore.